﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LibGreen.Protocol.IRC
{
	/// <summary>
	/// 
	/// </summary>
	public class ClientCommand
	{
		public static char[] whiteSpace = {' ', '\n', '\r', '\t' };
		public byte[] Packet;
		public const int MaxPacketSize = 512;
		public ClientCommand (string command, params string[] parameters)
		{
			var str = new StringBuilder (command);
			if (parameters.Length == 0)
				return;
			for (int x = 0; x < parameters.Length - 1; x++) {
				str.Append(parameters[x]);
			}
			if (parameters.Length >= 1) {
				str.Append(parameters[parameters.Length - 1]);
			}
			Packet = UTF8Encoding.UTF8.GetBytes (str.ToString ());
		}

	}
}
